package com.zfzs.post.modules.flow.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import java.sql.Timestamp;
import java.io.Serializable;

/**
* @author ck
* @date 2019-09-09
*/
@Entity
@Data
@Table(name="flow_withdraw")
public class FlowWithdraw implements Serializable {

    // 主键
    @Id
    @Column(name = "id")
    private Long id;

    // 所属代理商
    @Column(name = "agent_id")
    private Long agentId;

    // 提现金额
    @Column(name = "money")
    private Double money;

    // 状态 under ：审核中 success：成功 error：失败
    @Column(name = "status")
    private String status;

    // 创建日期
    @Column(name = "create_time")
    private Timestamp createTime;

    // 修改时间
    @Column(name = "update_time")
    private Timestamp updateTime;

    // 审核时间
    @Column(name = "under")
    private Timestamp under;

    public void copy(FlowWithdraw source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}